$(function () {
    var mySwiper = new Swiper('.swiper', {
        loop: true,
        noSwiping: true,
        noSwipingClass: 'stop-swiping',
        autoplay: {
            delay: 3000, //滚动间隔, 单位毫秒
            disableOnInteraction: false, // false代表不开启此功能设定
            pauseOnMouseEnter: true, //鼠标进入时暂停
        },
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },


    })
    $('.food2 ul>li').mouseover(function () {
        console.log($('#food2 ul>li'))
        $(this).addClass('active').siblings().removeClass('active')
    })
    var fishChart = new Swiper('.fishChart', {
        autoplay: {
            delay: 3000, //滚动间隔, 单位毫秒
            disableOnInteraction: false, // false代表不开启此功能设定
            pauseOnMouseEnter: true, //鼠标进入时暂停
        },
        noSwiping: true,
        noSwipingClass: 'stop-swiping',

        loop: true,
        slidesPerView: 4,
        spaceBetween: 20,
        navigation: {
            nextEl: '.swiper-button-next',
            prevEl: '.swiper-button-prev',
        },

    })
    $('#certify-swiper6').load('./pages/home/certify-swiper6/certify-swiper6.html')
    var cooperate = new Swiper('.cooperate', {
        autoplay: {
            delay: 3000,
            stopOnLastSlide: false,
            disableOnInteraction: true,
        },//可选选项，自动滑动
        loop: true,
        noSwiping: true,
        noSwipingClass: 'stop-swiping',
        slidesPerView: 5,
        pagination: {
            el: '.swiper-pagination',
            // 自定义样式类
            bulletClass: 'my-bullet',
            bulletActiveClass: 'my-bullet-active',
            clickable: true,//可以点击切换
        },
    })

    $('.newActive>div').mouseover(function(){
        $(this).addClass('active').siblings().removeClass('active')
        const i = $(this).index()
        console.log(i) 
        $('.newItem>div').eq(i).show().siblings().hide()
    }).eq(0).mouseover()
})